free energy minimization